<template>
  <el-row type="flex">
    <div class="parameter-title">{{firstTitle}}</div>
    <div class="parameter-content">
      <template v-for="val in item">
        <div :key="val">
          <p v-if="val.second_title" class="parameter-content-title">{{val.second_title}}</p>
          <p class="parameter-content-body">{{val.document}}</p>
          <el-image v-if="val.image" class="parameter-content-img" :src="utils.setCdnUrl() + val.image"></el-image>
        </div>
      </template>
    </div>
  </el-row>
</template>

<script>
import { fileDomain } from '@/utils/index.js'
export default {
  props: {
    item: {
      type: Array,
      default() {
        return []
      }
    }
  },
  computed: {
    firstTitle() {
      return this.item.length ? this.item[0].first_title : ''
    }
  },
  methods: {
    fileDomain
  }
}
</script>

<style scoped>
.parameter-title {
  width: 240px;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #191919;
  background-color: #FAFAFA;
  border: 1px solid #EAEAEA;
}
.parameter-content {
  flex: 1;
  padding: 16px 24px;
  border: 1px solid #EAEAEA;
  border-left: 0;
}
.parameter-content-title {
  font-size: 14px;
  color: #191919;
  line-height: 22px;
  margin-bottom: 4px;
}
.parameter-content-body {
  font-size: 14px;
  color: #6D6D6D;
  line-height: 22px;
}
.parameter-content-img {
  margin-top: 8px;
}
</style>

</style>